﻿<%@ Page Language="C#" MasterPageFile="~/Global/SubUser.Master" AutoEventWireup="true"
    CodeBehind="prodetail.aspx.cs" Inherits="TVC_WEB.Global.prodetail" Title="Untitled Page" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .btnAddBasket
        {
            background-image: url(                  './Images/add-basket.gif' );
            width: 170px;
            height: 30px;
            border: none;
        }
        .btnContinue
        {
            background-image: url(                  './Images/continue-shopping.gif' );
            width: 170px;
            height: 30px;
            border: none;
        }
        .btnWishList
        {
            background-image: url(                  './Images/add-wishlist.gif' );
            width: 170px;
            height: 30px;
            border: none;
        }
        .productItem
        {
            width: 169px;
            float: left;
            padding: 5px;
            margin: 5px;
            text-align: center;
        }
        .groupSeparator
        {
            border-top: 1px dotted Gray;
            height: 1px;
            clear: both;
        }
        .itemSeparator
        {
            height: 193px;
            width: 1px;
            border-left: 1px dotted Gray;
            float: left;
        }
    </style>

    <script type="text/javascript">
        var zoom1 = '';
        var zoom2 = new Array(  <%=hdNumList.Value %>
                                0,
                                0);
        var zoom3 = new Array(<%=hdImgList.Value %>        
                             '',
                             '');
        function imageChange(num)
        {
            var number = num;
            if (num > 0) number = '[' + num + ']'; else number = '';
            var image = "<img Width='166px' src='" + zoom3[num] + "' alt=''";
            if (zoom2[num] == 1)
            {
                if (document.getElementById('zoom') && zoom1)
                {
                    document.getElementById('zoom').innerHTML = zoom1;
                }
                if (document.getElementById('zoomlink'))
                {
                    document.getElementById('zoomlink').href = zoom3[num];
                    if (document.getElementById('zoomlink2')) document.getElementById('zoomlink2').href = zoom3[num];
                }
                image = '<a href="' + zoom3[num] + '" rel="lightbox" title="<%=lbName.Text %>">' + image + ' title="Zoom"><\/a>';
            }
            else
            {
                if (document.getElementById('zoom'))
                {
                    if (document.getElementById('zoom').innerHTML) zoom1 = document.getElementById('zoom').innerHTML;
                        document.getElementById('zoom').innerHTML = '';
                }
                image += '>';
            }
            document.getElementById('image').innerHTML = image;
            jQuery('a[rel^=lightbox]').lightBox();
            return;
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="breadcrumb">
        <p class="first">
            <asp:Literal ID="lbCatePath" runat="server" Mode="PassThrough"></asp:Literal>
        </p>
    </div>
    <h1>
        <asp:Literal ID="lbName" runat="server"></asp:Literal></h1>
    <div class="p">
        <table class="grid">
            <tbody>
                <tr>
                    <td width="50%" align="center" id="product_images" style="padding-left: 10px; padding-right: 10px;">
                        <div class="p2">
                            <div id="image">
                                <a title="<%=lbName.Text %>" rel="lightbox" href="<%=GetFirstImg() %>">
                                    <asp:HiddenField ID="hdNumList" runat="server" />
                                    <asp:HiddenField ID="hdImgList" runat="server" />
                                    <img title="Zoom" alt="" src="<%=GetFirstImg() %>" width="166px" /></a></div>
                            <div id="zoom" class="gap">
                                <table class="options">
                                    <tbody>
                                        <tr>
                                            <td>
                                                <a id="zoomlink2" title="<%=lbName.Text %>" rel="lightbox" href="<%=GetFirstImg() %>">
                                                    <img alt="Zoom" src="./images/zoom.gif" /></a>
                                            </td>
                                            <td>
                                                <a id="zoomlink" title="<%=lbName.Text %>" rel="lightbox" href="<%=GetFirstImg() %>">
                                                    <span title="Zoom">Zoom</span></a>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                            <asp:ListView ID="lImages" runat="server" OnItemDataBound="lImages_ItemDataBound">
                                <LayoutTemplate>
                                    <table style="margin-top: 10px" class="tables">
                                        <tbody>
                                            <tr>
                                                <td id="itemPlaceHolder" runat="server">
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <td style="width: 25%; text-align: center;">
                                        <a id="altimg" onclick="imageChange(<%#Container.DataItemIndex %>); return false;"
                                            href="javascript:void(0);">
                                            <img alt="<%#Eval("NameVN")%>" src="<%#GetImage(Eval("IMG").ToString()) %>" height="50px"
                                                width="40px" /></a>
                                    </td>
                                </ItemTemplate>
                            </asp:ListView>
                        </div>
                    </td>
                    <td>
                        <img alt="" src="./images/spacerv.gif" />
                    </td>
                    <td class="vertical">
                        <img alt="" src="./images/spacerv.gif" />
                    </td>
                    <td width="50%" align="left" id="product_details" style="padding-left: 10px" valign="top">
                        <div class="info">
                            <asp:Image ID="imgIcon" runat="server" Height="25px" Width="25px" />
                        </div>
                        <div id="order" class="p2">
                            <table class="alternate">
                                <tbody>
                                    <tr>
                                        <td align="left" style="padding: 5px 10px">
                                            <b>Giá:</b>&nbsp;&nbsp;<span id="price_selling"><font class="selling_price"><b><asp:Literal
                                                ID="lbPrice" runat="server"></asp:Literal>&nbsp;</b></font></span>(đã bao gồm 
                                            VAT)
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <div id="order2" class="p2">
                                <table class="alternate">
                                    <tbody>
                                        <tr>
                                            <td align="left" style="padding: 5px 10px">
                                                <telerik:RadNumericTextBox ID="txtQuantity" runat="server" Width="50px" Culture="English (United States)"
                                                    MinValue="0">
                                                    <NumberFormat DecimalDigits="0" />
                                                </telerik:RadNumericTextBox>
                                            </td>
                                            <td align="right" id="add" style="padding: 5px 10px">
                                                <span class="gap">
                                                    <asp:Button ID="btnAddBasket" runat="server" CssClass="btnAddBasket" OnClick="btnAddBasket_Click" />
                                                </span>&nbsp;
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                
                            </div><table class="alternate">
                                    <tbody>
                                        <tr>
                                            <td align="left"style="padding: 5px 10px">
                                                <b>Kích thước: </b>
                                            </td>
                                            <td align="left"style="padding: 5px 10px">
                                                <asp:Literal ID="liSize" runat="server"></asp:Literal>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left"style="padding: 5px 10px">
                                                <b>Chất liệu: </b>
                                            </td>
                                            <td align="left"style="padding: 5px 10px">
                                                <asp:Literal ID="liMaterial" runat="server"></asp:Literal>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <p><b>Mô tả:</b></p>
                                <asp:Literal ID="liSortDesc" runat="server" Mode="PassThrough"></asp:Literal>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
        Skin="Windows7" SelectedIndex="0">
        <Tabs>
            <telerik:RadTab runat="server" PageViewID="RadPageView2" 
                Text="Chi tiết sản phẩm" Selected="True">
            </telerik:RadTab>
            <telerik:RadTab runat="server" PageViewID="RadPageView1" Text="Thuộc tính">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
        <telerik:RadPageView ID="RadPageView1" runat="server">
            <asp:Literal ID="lbSubCate" runat="server" Mode="PassThrough"></asp:Literal></telerik:RadPageView>
        <telerik:RadPageView ID="RadPageView2" runat="server">
            <div>
            </div>
            <asp:Literal ID="lbDescribe" runat="server" Mode="PassThrough"></asp:Literal>
        </telerik:RadPageView>
    </telerik:RadMultiPage>
    <div align="center" class="p">
        <div class="hrd">
            <hr>
        </div>
    </div>
    <div class="p">
        <table class="grid">
            <tbody>
                <tr>
                    <td width="50%" align="center">
                        <a href="/childrens-accessories.html">
                            <asp:Button ID="btnContinue" runat="server" CssClass="btnContinue" OnClick="btnContinue_Click" />
                        </a>
                    </td>
                    <td width="50%" align="center">
                        <asp:Button ID="btnWishList" runat="server" CssClass="btnWishList" />
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    <div class="cb_divider">
    </div>
    <table cellpadding="0" class="block">
        <tbody>
            <tr>
                <td class="cb_title">
                    Sản phẩm liên quan
                </td>
            </tr>
            <tr>
                <td class="cb_content">
                    <asp:ListView ID="lvPro" runat="server" GroupItemCount="3">
                        <LayoutTemplate>
                            <div style="width: 100%;">
                                <asp:PlaceHolder runat="server" ID="groupPlaceHolder" />
                            </div>
                        </LayoutTemplate>
                        <GroupTemplate>
                            <div style="clear: both;">
                                <asp:PlaceHolder runat="server" ID="itemPlaceHolder" />
                            </div>
                        </GroupTemplate>
                        <ItemTemplate>
                            <div class="productItem">
                                <div align="left">
                                    <p class="first" style="text-align: center;">
                                        Mã:
                                        <%# Eval("Code").ToString()%>
                                    </p>
                                    <div class="primw">
                                        <div class="prim">
                                            <div style="position: absolute; margin-left: 130px; margin-top: -10px; height: 25px;
                                                width: 25px">
                                                <img src="<%#GetImage(Eval("Icon").ToString()) %>" width="25px" />
                                            </div>
                                            <a href="prodetail.aspx?id=<%# Eval("ID").ToString()%>">
                                                <img src="<%#GetImage(Eval("Image").ToString()) %>" width="150" height="99" hspace="0"
                                                    vspace="0" alt="<%# Eval("NameVN").ToString()%>"></a></div>
                                    </div>
                                    <p>
                                    </p>
                                    <p class="last">
                                        <span class="prti"><a href="/prodetail.aspx?id=<%# Eval("ID").ToString()%>"><b>
                                            <%# Eval("NameVN").ToString()%></b></a></span><span class="gap"><font class="selling_price"><b><%# GetPrice(Eval("NewPrice").ToString())%></b></font></span></p>
                                </div>
                            </div>
                        </ItemTemplate>
                        <ItemSeparatorTemplate>
                            <div class="itemSeparator">
                            </div>
                        </ItemSeparatorTemplate>
                        <GroupSeparatorTemplate>
                            <div class="groupSeparator">
                            </div>
                        </GroupSeparatorTemplate>
                        <EmptyDataTemplate>
                        </EmptyDataTemplate>
                    </asp:ListView>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="cb_divider">
    </div>
    <table cellpadding="0" class="block">
        <tbody>
            <tr>
                <td style="padding: 0px" class="cb_title">
                    <img alt="Customer Reviews" src="/global/Images/customer-reviews.gif" />
                </td>
            </tr>
            <tr>
                <td class="cb_content">
                    <p class="both">
                        <b>Be the first to</b> <a rel="nofollow" href="/childrens-accessories/car-room-decoration-whiteboard-sticker/action/review/">
                            <b>Write a Review</b></a> <b>for this item!</b></p>
                </td>
            </tr>
        </tbody>
    </table>
    <div class="clear">
    </div>
</asp:Content>
